home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 January / macformat46.iso / Shareware Plus / Developers / Library / Grant's CGI Framework / Grant's CGI Framework / grantscgi / Util / IconUtil.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-20  |  1010 b   |  52 lines

  1. /*****
  2.  *
  3.  *    IconUtil.c
  4.  *
  5.  *    This is a support file for "Grant's CGI Framework".
  6.  *    Please see the license agreement that accompanies the distribution package
  7.  *    for licensing details.
  8.  *
  9.  *    Copyright ©1995,1996 by Grant Neufeld
  10.  *    grant@acm.com
  11.  *    http://arpp.carleton.ca/cgi/framework/
  12.  *
  13.  *****/
  14.  
  15. #include "MyConfiguration.h"
  16. #if kCompileWithForeground
  17.  
  18. #include <Icons.h>
  19.  
  20. #include "IconUtil.h"
  21.  
  22.  
  23. /***  FUNCTIONS  ***/
  24.  
  25. /* IM-MoreMTB: 5-10 */
  26. void
  27. IconDrawFromFamily ( short resID, Rect *destRect, Handle *iconSuiteHdl )
  28. {
  29.     IconSelectorValue    iconType;
  30.     IconAlignmentType    align;
  31.     IconTransformType    transform;
  32.     OSErr                theErr;
  33.     
  34.     if ( *iconSuiteHdl == NULL )
  35.     {
  36.         iconType    = svAllAvailableData;
  37.         theErr        = GetIconSuite ( iconSuiteHdl, resID, iconType );
  38.     }
  39.     
  40.     if ( *iconSuiteHdl != NULL )
  41.     {
  42.         align        = atAbsoluteCenter;
  43.         transform    = ttNone;
  44.         theErr        = PlotIconSuite ( destRect, align, transform, *iconSuiteHdl );
  45.     }
  46. } /* IconDrawFromFamily */
  47.  
  48.  
  49. #endif    /* kCompileWithForeground */
  50.  
  51. /*****  EOF  *****/
  52.